<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>popot-2.01: popot::PSO::particle::Particle Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">popot-2.01
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacepopot.html">popot</a>      </li>
      <li class="navelem"><a class="el" href="namespacepopot_1_1PSO.html">PSO</a>      </li>
      <li class="navelem"><a class="el" href="namespacepopot_1_1PSO_1_1particle.html">particle</a>      </li>
      <li class="navelem"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html">Particle</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">popot::PSO::particle::Particle Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="popot::PSO::particle::Particle" --><!-- doxytag: inherits="Base&lt; TVECTOR_TYPE &gt;" -->
<p><code>#include &lt;<a class="el" href="individuals_8h_source.html">individuals.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for popot::PSO::particle::Particle:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpopot_1_1PSO_1_1particle_1_1Particle.png" usemap="#popot::PSO::particle::Particle_map" alt=""/>
  <map id="popot::PSO::particle::Particle_map" name="popot::PSO::particle::Particle_map">
<area href="classpopot_1_1PSO_1_1particle_1_1Base.html" alt="popot::PSO::particle::Base&lt; TVECTOR_TYPE &gt;" shape="rect" coords="0,0,278,24"/>
</map>
 </div></div>

<p><a href="classpopot_1_1PSO_1_1particle_1_1Particle-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Base.html">TSuper</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ae714c7c4871ef295ea0d7451b04df0cf">BestType</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
<a class="el" href="classpopot_1_1PSO_1_1neighborhood_1_1Neighborhood.html">popot::PSO::neighborhood::Neighborhood</a><br class="typebreak"/>
&lt; <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html">ThisParticleType</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa44ea6ac3cd2e1396f73aaf30c93b513">NeighborhoodType</a></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#afd33b22591f31959507ce14eb0130dbd">Particle</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a40ec1b6f5de3ebfdbd5df840101e6c5a">Particle</a> (size_t dimension)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a63a8672d03c2cc3cd79faf36835c94fc">Particle</a> (const <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html">Particle</a> &amp;other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a5a321e90d6b72ae4a50f8d658a5f9eb8">~Particle</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TVECTOR_TYPE &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa54ae810436504fee17569cc48260e62">getVelocity</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ac2642be85ba4fc064efecad2825f5410">initBestPosition</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ae714c7c4871ef295ea0d7451b04df0cf">BestType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a8d1cf426edc9d3261d6a6a4e9c2a110c">getBestPosition</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa44ea6ac3cd2e1396f73aaf30c93b513">NeighborhoodType</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a1cfe00155f4255d52df54c0864c42e61">getNeighborhood</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a6f02b4e144a100a4e3889a7c6aa1fdfb">print</a> (std::ostream &amp;os) const </td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">TVECTOR_TYPE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ab66eb4e43a68d5f454ea4891a40e861a">_velocity</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ae714c7c4871ef295ea0d7451b04df0cf">BestType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a7f1a0546236dac2736a185efb0d05ea4">_best_position</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa44ea6ac3cd2e1396f73aaf30c93b513">NeighborhoodType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a95561ca312e67675f04ccd5fc842037c">_neighborhood</a></td></tr>
</table>
<hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="ae714c7c4871ef295ea0d7451b04df0cf"></a><!-- doxytag: member="popot::PSO::particle::Particle::BestType" ref="ae714c7c4871ef295ea0d7451b04df0cf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Base.html">TSuper</a> <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ae714c7c4871ef295ea0d7451b04df0cf">popot::PSO::particle::Particle::BestType</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aa44ea6ac3cd2e1396f73aaf30c93b513"></a><!-- doxytag: member="popot::PSO::particle::Particle::NeighborhoodType" ref="aa44ea6ac3cd2e1396f73aaf30c93b513" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classpopot_1_1PSO_1_1neighborhood_1_1Neighborhood.html">popot::PSO::neighborhood::Neighborhood</a>&lt; <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html">ThisParticleType</a> &gt; <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa44ea6ac3cd2e1396f73aaf30c93b513">popot::PSO::particle::Particle::NeighborhoodType</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afd33b22591f31959507ce14eb0130dbd"></a><!-- doxytag: member="popot::PSO::particle::Particle::Particle" ref="afd33b22591f31959507ce14eb0130dbd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">popot::PSO::particle::Particle::Particle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Default constructor, dimension=0 is assumed </p>

</div>
</div>
<a class="anchor" id="a40ec1b6f5de3ebfdbd5df840101e6c5a"></a><!-- doxytag: member="popot::PSO::particle::Particle::Particle" ref="a40ec1b6f5de3ebfdbd5df840101e6c5a" args="(size_t dimension)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">popot::PSO::particle::Particle::Particle </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dimension</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Default constructor </p>

</div>
</div>
<a class="anchor" id="a63a8672d03c2cc3cd79faf36835c94fc"></a><!-- doxytag: member="popot::PSO::particle::Particle::Particle" ref="a63a8672d03c2cc3cd79faf36835c94fc" args="(const Particle &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">popot::PSO::particle::Particle::Particle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html">Particle</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Copy constructor </p>

</div>
</div>
<a class="anchor" id="a5a321e90d6b72ae4a50f8d658a5f9eb8"></a><!-- doxytag: member="popot::PSO::particle::Particle::~Particle" ref="a5a321e90d6b72ae4a50f8d658a5f9eb8" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual popot::PSO::particle::Particle::~Particle </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8d1cf426edc9d3261d6a6a4e9c2a110c"></a><!-- doxytag: member="popot::PSO::particle::Particle::getBestPosition" ref="a8d1cf426edc9d3261d6a6a4e9c2a110c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ae714c7c4871ef295ea0d7451b04df0cf">BestType</a>&amp; popot::PSO::particle::Particle::getBestPosition </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns a reference to the current best position </p>

</div>
</div>
<a class="anchor" id="a1cfe00155f4255d52df54c0864c42e61"></a><!-- doxytag: member="popot::PSO::particle::Particle::getNeighborhood" ref="a1cfe00155f4255d52df54c0864c42e61" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa44ea6ac3cd2e1396f73aaf30c93b513">NeighborhoodType</a>&amp; popot::PSO::particle::Particle::getNeighborhood </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns a pointer to the neighborhood of the particle </p>

</div>
</div>
<a class="anchor" id="aa54ae810436504fee17569cc48260e62"></a><!-- doxytag: member="popot::PSO::particle::Particle::getVelocity" ref="aa54ae810436504fee17569cc48260e62" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TVECTOR_TYPE&amp; popot::PSO::particle::Particle::getVelocity </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Getter on the velocity </p>

</div>
</div>
<a class="anchor" id="ac2642be85ba4fc064efecad2825f5410"></a><!-- doxytag: member="popot::PSO::particle::Particle::initBestPosition" ref="ac2642be85ba4fc064efecad2825f5410" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::particle::Particle::initBestPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initialization of the best position to the current position </p>

</div>
</div>
<a class="anchor" id="a6f02b4e144a100a4e3889a7c6aa1fdfb"></a><!-- doxytag: member="popot::PSO::particle::Particle::print" ref="a6f02b4e144a100a4e3889a7c6aa1fdfb" args="(std::ostream &amp;os) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void popot::PSO::particle::Particle::print </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>os</em></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Display the current position+fitness and the current best position + fitness </p>

<p>Reimplemented from <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Base.html#a32c12b2b8a31591d80af37390c64a9f5">popot::PSO::particle::Base&lt; TVECTOR_TYPE &gt;</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a7f1a0546236dac2736a185efb0d05ea4"></a><!-- doxytag: member="popot::PSO::particle::Particle::_best_position" ref="a7f1a0546236dac2736a185efb0d05ea4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ae714c7c4871ef295ea0d7451b04df0cf">BestType</a> <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a7f1a0546236dac2736a185efb0d05ea4">popot::PSO::particle::Particle::_best_position</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a95561ca312e67675f04ccd5fc842037c"></a><!-- doxytag: member="popot::PSO::particle::Particle::_neighborhood" ref="a95561ca312e67675f04ccd5fc842037c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#aa44ea6ac3cd2e1396f73aaf30c93b513">NeighborhoodType</a> <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#a95561ca312e67675f04ccd5fc842037c">popot::PSO::particle::Particle::_neighborhood</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab66eb4e43a68d5f454ea4891a40e861a"></a><!-- doxytag: member="popot::PSO::particle::Particle::_velocity" ref="ab66eb4e43a68d5f454ea4891a40e861a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TVECTOR_TYPE <a class="el" href="classpopot_1_1PSO_1_1particle_1_1Particle.html#ab66eb4e43a68d5f454ea4891a40e861a">popot::PSO::particle::Particle::_velocity</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/opt/GoogleCode/popot/trunk/popot-2.01/src/<a class="el" href="individuals_8h_source.html">individuals.h</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>
